package com.investmenttechnologyservices.model;

import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;


public class Exchange extends EntityHolder {

	//@Id
	//String id; // MIC code
	//String name;
	//String bic;
	//String oldFixId;
	//Key region
	
	private static final Key world = KeyFactory.createKey("region", "world");
	
	public Exchange(Entity entity) {
		super(entity);
	}
	
	public Exchange(String id) {
	    super("exchange",id);
	}

	public Exchange(String id, String name, String bic, String oldFixId, Key regionKey) {
		this(id);
		setName(name);
		setBic(bic);
		setOldFixId(oldFixId);
		setRegionKey(regionKey);
	}
	
	public Exchange(String key, String name, String bic, String oldFixId) {
		this(key, name, bic, oldFixId, null);
	}

	public String getId() {return super.getId();}
	
	public String getName() {
		return (String) getProperty("name");
	}

	public void setName(String name) {
		setProperty("name", name);
	}
	
	public String getBic() {
		return (String) getProperty("bic");
	}

	public void setBic(String bic) {
		setProperty("bic", bic);
	}
	
	public String getOldFixId() {
		return (String) getProperty("oldFixId");
	}

	public void setOldFixId(String oldFixId) {
		setProperty("oldFixId", oldFixId);
	}
	
	public void setRegionKey(Key region) {
		if (region != null && region != world) {
			setProperty("region",region);
		}
	}
	public Key getRegionKey() {
		Key region = (Key) getProperty("region");
		if (region == null) {
			region = world;
		}
		return region;
	}
}	
/**
 * 
 * @author david.goodman
 *
public enum Exchange {

	XABJ("BOURSE DES VALEURS ABIDJAN","XABJCIA1XXX","CI"),
	XACE("AMSTERDAM COMMODITY EXCHANGE","XACENL21XXX",""),
	XADE("ATHENS DERIVATIVES EXCHANGE S.A. (ADEX), THE","XADEGRA1XXX",""),
	XAEX("AEX-AGRICULTURAL FUTURES EXCHANGE","XAEXNL21XXX","E"),
	XALB("ALBERTA STOCK EXCHANGE, THE","XALBCA61XXX",""),
	XAMM("AMMAN STOCK EXCHANGE","XAMMJOA1XXX","AM"),
	XAMS("AMSTERDAMSE EFFECTENBEURS","XAMSNL21XXX","AS"),
	XANT("BEURS VAN ANTWERPEN (ANTWERP STOCK EXCHANGE)","XANTBE21XXX",""),
	XAOM("AUSTRALIAN OPTIONS MARKET","XAOMAU21XXX",""),
	XAPI("ASIA-PACIFIC INTERBANK CURRENCY EXCHANGE THE, JOINT STOCK COMPANY","XAPIRU81XXX",""),
	XASE("AMERICAN STOCK EXCHANGE","XASEUS31XXX","A"),
	XASX("ASX OPERATIONS PTY LIMITED","XASXAU2SXXX","AX"),
	XATH("ATHENS STOCK EXCHANGE","XATHGRA1XXX",""),
	XAUK("NEW ZEALAND STOCK EXCHANGE - AUCKLAND","XAUKNZ21XXX",""),
	XAVB("CMB, AGENCIA DE VALORES Y BOLSA","XAVBESM1XXX",""),
	XBAH("BAHRAIN STOCK EXCHANGE","XBAHBHB1XXX","BH"),
	XBAN("BANGALORE STOCK EXCHANGE LTD","XBANIN51XXX",""),
	XBAR("BARCELONA STOCK EXCHANGE","XBARESB1XXX","BC"),
	XBAV("MERCHBOLSA AGENCIA DE VALORES, S.A.","XBAVESB1XXX",""),
	XBCE("BUDAPEST COMMODITY EXCHANGE","XBCEHUH1XXX",""),
	XBCN("SOCIEDAD RECTORA DE LA BOLSA DE VALORES DE BARCELONA S.A.","XBCNESB1XXX",""),
	XBDA("BERMUDA STOCK EXCHANGE LTD, THE","XBDABMH1XXX",""),
	XBDP("BOLSA DE DERIVADOS DO PORTO","XBDPPTPPXXX",""),
	XBER("BERLINER WERTPAPIERBOERSE","XBERDEB1XXX","BE"),
	XBEY("BOURSE DE BEYROUTH","XBEYLBB1XXX","BY"),
	XBFO("BELFOX (BELGIAN FUTURES AND OPTIONS EXCHANGE)","XBFOBEB1XXX","b"),
	XBIL("BOLSA DE VALORES DE BILBAO","XBILES21XXX","BI"),
	XBKK("STOCK EXCHANGE OF THAILAND","XBKKTHB1XXX","BK"),
	XBMF("BOLSA DE MERCADORIAS E FUTUROS - BM E F","XBMFBRSPXXX",""),
	XBNV("BOLSA NACIONAL DE VALORES, S.A.","XBNVCRS1XXX",""),
	XBOG("BOLSA DE BOGOTA S.A.","XBOGCOB1XXX",""),
	XBOL("BOLSA BOLIVIANA DE VALORES S.A.","XBOLBOL1XXX",""),
	XBOM("BOMBAY STOCK EXCHANGE","XBOMINB1XXX","BO"),
	XBOR("BORDEAUX STOCK EXCHANGE","XBORFR21XXX",""),
	XBOS("BOSTON STOCK EXCHANGE","XBOSUS31XXX","B"),
	XBOT("BOTSWANA SHARE MARKET","XBOTBWG1XXX","BT"),
	XBPR("DEUTSCHE BOERSE (BOX-PRODUCT)","XBPRDEF1XXX",""),
	XBRA("BRATISLAVA STOCK EXCHANGE, THE","XBRASKB1XXX",""),
	XBRE("BREMER WERTPAPIERBOERSE","XBREDE21XXX","BM"),
	XBRN("BERNE STOCK EXCHANGE","XBRNCH21XXX","BN"),
	XBRU("BRUSSELS STOCK EXCHANGE","XBRUBEB1XXX","BR"),
	XBSE("BUCHAREST STOCK EXCHANGE","XBSEROB1XXX",""),
	XBSL("BASLE STOCK EXCHANGE","XBSLCHB1XXX",""),
	XBSP("BOLSA DE VALORES DE SAO PAULO","XBSPBRS1XXX","SA"),
	XBUD("BUDAPEST STOCK EXCHANGE","XBUDHUH1XXX",""),
	XBUE("BUENOS AIRES STOCK EXCHANGE","XBUEARB1XXX",""),
	XBUL("FIRST BULGARIAN STOCK EXCHANGE","XBULBGS1XXX",""),
	XCAI("CAIRO STOCK EXCHANGE","XCAIEGC1XXX",""),
	XCAL("CALCUTTA STOCK EXCHANGE","XCALINC1XXX","CL"),
	XCAR("CARACAS STOCK EXCHANGE","XCARVEC1XXX",""),
	XCAS("CASABLANCA STOCK EXCHANGE","XCASMAM1XXX",""),
	XCBO("CHICAGO BOARD OPTIONS EXCHANGE","XCBOUS41XXX","W"),
	XCBT("CHICAGO BOARD OF TRADE","XCBTUS41XXX",""),
	XCCE("CHUBU COMMODITY EXCHANGE","XCCEJPJ1XXX",""),
	XCEC("COMMODITIES EXCHANGE CENTER","XCECUS31XXX",""),
	XCEL("COMMODITY EXCHANGE OF LJUBLJANA","XCELSI21XXX",""),
	XCET("COMMODITY EXCHANGE 'TASHKENT'","XCETUZ21XXX",""),
	XCFE("CHINA FOREIGN EXCHANGE TRADE SYSTEM","XCFECNS1XXX",""),
	XCFF("CANTOR FINANCIAL FURTURES EXCHANGE","XCFFUS31XXX",""),
	XCFV("CAMARA DE COMPSENSACISON DE OPCIONES Y FUTUROS DE VENEZUELA","XCFVVEC1XXX","EB"),
	XCHI("CHICAGO STOCK EXCHANGE, INC.","XCHIUS41XXX","MW"),
	XCIS("CINCINNATI STOCK EXCHANGE","XCISUS41XXX","C"),
	XCME("CHICAGO MERCANTILE EXCHANGE","XCMEUS4CXXX","2"),
	XCMO("COMMODITY AND MONETARY EXCHANGE OF MALAYSIA","XCMOMYK1XXX",""),
	XCOL("COLOMBO STOCK EXCHANGE","XCOLLKL1XXX","CM"),
	XCOR("COREDEAL","XCORGB21XXX",""),
	XCRC("CHICAGO RICE AND COTTON EXCHANGE","XCRCUS41XXX",""),
	XCSC("NEW YORK COCOA, COFFEE AND SUGAR EXCHANGE","XCSCUS31XXX",""),
	XCSE("COPENHAGEN STOCK EXCHANGE","XCSEDKK1XXX","CO"),
	XCUE("CURRENCY EXCHANGE","XCUEUZ21XXX",""),
	XCVM("INTERBOLSA, SOC. GESTORA DE SISTEMAS DE LIQUIDACAO E DE SISTEMAS CENTRALIZADOS DE VALORES MOBILIARIOS, SA","XCVMPTPPXXX","IN"),
	XCYS("CYPRUS STOCK EXCHANGE INSTITUTION","XCYSCY21XXX",""),
	XDES("DELHI STOCK EXCHANGE","XDESIND1XXX","DL"),
	XDHA("DHAKA STOCK EXCHANGE LTD","XDHABDD1XXX",""),
	XDMI("ITALIAN DERIVATIVES MARKET (IDEM)","XDMIITM1XXX",""),
	XDTB("DTB DEUTSCHE TERMINBOERSE GMBH","XDTBDEF1XXX",""),
	XDUB("IRISH STOCK EXCHANGE","XDUBIE21XXX","I"),
	XDUS("RHEINISCHE-WESTFAELISCHE BOERSE ZU DUESSELDORF","XDUSDED1XXX","D"),
	XDWZ("DEUTSCHE BOERSE AG, FRANKFURT AM MAIN","XDWZDEF1XXX",""),
	XEAS("EASDAQ S.A.","XEASBEB1XXX",""),
	XEEE("EUROPEAN ENERGY EXCHANGE AG","XEEEDEF1XXX",""),
	XEMD("MERCADO MEXICANO DE DERIVADOS","XEMDMXM1XXX",""),
	XETR("DEUTSCHER KASSENVEREIN AG GRUPPE DEUTSCHE BOERSE","XETRDEF1XXX",""),
	XEUB("EUREX BONDS","XEUBDEF1XXX",""),
	XEUC("EURONEXT COM, COMMODITIES FUTURES & OPTIONS","XEUCNL21XXX",""),
	XEUE("EURONEXT EQF, EQUITIES & INDICES DERIVATIVES","XEUENL21XXX",""),
	XEUI("EURONEXT IRF, INTEREST RATE FUTURE& OPTIONS","XEUINL21XXX",""),
	XEUM("EURONEXT MONEP","XEUMFRP1XXX",""),
	XEUN("EURONEXT PARIS","XEUNFRP1XXX",""),
	XEUR("EUREX AG","XEURCHZ1XXX","d"),
	XFIR("BORSA VALORI DI FIRENZE (STOCK EXCHANGE)","XFIRIT31XXX",""),
	XFKA("FUKUOKA STOCK EXCHANGE","XFKAJPJ1XXX","FU"),
	XFMN("SOCIETE DU NOUVEAU MARCHE","XFMNFRP1XXX","LN"),
	XFNX("FINEX","XFNXIE21XXX",""),
	XFOM("FINNISH OPTIONS MARKET","XFOMFIH1XXX",""),
	XFRA("FRANKFURTER WERTPAPIERBOERSE","XFRADEF1XXX","F"),
	XFTA("FINANCIELE TERMIJNMARKET AMSTERDAM","XFTANL21XXX",""),
	XGAL("ST. GALLEN STOCK EXCHANGE","XGALCH21XXX",""),
	XGEN("BORSA VALORI DI GENOVA (STOCK EXCHANGE)","XGENITG1XXX",""),
	XGTG("BOLSA DE VALORES NACIONAL SA","XGTGGTG1XXX",""),
	XGHA("GHANA STOCK EXCHANGE","XGHAGHA1XXX","GH"),
	XGUA("GUAYAQUIL STOCK EXCHANGE","XGUAECE1XXX",""),
	XGVA("GENEVA STOCK EXCHANGE","XGVACHG1XXX",""),
	XHAM("HANSEATISCHE WERTPAPIERBOERSE HAMBURG","XHAMDEH1XXX","H"),
	XHAN("NIEDERSAECHSISCHE BOERSE ZU HANNOVER","XHANDE21XXX","HA"),
	XHCE("WARENTERMINBOERSE HANNOVER","XHCEDE21XXX",""),
	XHEL("THE HELSINKI STOCK EXCHANGE","XHELFIH1XXX","HE"),
	XHIR("HIROSHIMA STOCK EXCHANGE","XHIRJPJ1XXX",""),
	XHKC("HONG KONG SECURITIES CLEARING COMPANY, LIMITED","XHKCHKHHXXX",""),
	XHKF("HONG KONG FUTURES EXCHANGE LTD.","XHKFHKHHTRE",""),
	XHKG("STOCK EXCHANGE OF HONG KONG LTD, THE","XHKGHKH1XXX","HK"),
	XIBE("BAKU INTERBANK CURRENCY EXCHANGE","XIBEAZ21XXX",""),
	XIBR("IBIS-R","XIBRDEF1XXX",""),
	XICE("ICELAND STOCK EXCHANGE","XICEISR1XXX","IC"),
	XIFO("IRISH FUTURES AND OPTIONS EXCHANGE (DUBLIN)","XIFOIE21XXX",""),
	XIME("TAIWAN INTERNATIONAL MERCANTILE EXCHANGE","XIMETWT1XXX",""),
	XIMM("INTERNATIONAL MONETARY MARKET","XIMMUS41XXX",""),
	XIOM("INDEX AND OPTIONS MARKET","XIOMUS41XXX",""),
	XIPE("INTERNATIONAL PETROLEUM EXCHANGE","XIPEGB21XXX",""),
	XISM("I.S.M.A. - THE INTERNATIONAL SECURITIES MARKETS ASSOCIATION","XISMGB21XXX","15"),
	XIST("I.M.K.B. (ISTANBUL STOCK EXCHANGE)","XISTTRI1XXX","IS"),
	XISX("INTERNATIONAL SECURITIES EXCHANGE, LLC.","XISXUS31XXX",""),
	XJAM("JAMAICA STOCK EXCHANGE, THE","XJAMJMK1XXX",""),
	XJNB("JAKARTA NEGOTIATED BOARD","XJNBIDJ1XXX",""),
	XJKT("JAKARTA STOCK EXCHANGE","XJKTIDJ1XXX","JK"),
	XJSE("JOHANNESBURG STOCK EXCHANGE, THE","XJSEZAJJXXX","J"),
	XJWY("JIWAY EXCHANGE LTD","XJWYGB21XXX","14"),
	XKAC("KANSAI AGRICULTURAL COMMODITIES EXCHANGE","XKACJPJ1XXX",""),
	XKAR("KARACHI STOCK EXCHANGE (GUARANTEE) LIMITED, THE","XKARPKK1XXX","KA"),
	XKAZ("CENTRAL ASIAN STOCK EXCHANGE","XKAZKZK1XXX","KZ"),
	XKBT("KANSAS CITY BOARD OF TRADE","XKBTUS41XXX",""),
	XKCE("KHOREZM INTERREGION COMMODITY EXCHANGE","XKCEUZ31XXX",""),
	XKFE("KOREA FUTURES EXCHANGE","XKFEKR21XXX",""),
	XKGT("KOBE GOMU TORIHIKIJO (RUBBER EXCHANGE)","XKGTJPJ1XXX",""),
	XKHR("KHARKOV COMMODITY EXCHANGE","XKHRUA21XXX",""),
	XKIE("KIEV UNIVERSAL EXCHANGE","XKIEUAU1XXX",""),
	XKKT("KOBE KIITO TORIHIKIJO (RAW SILK EXCHANGE)","XKKTJPJ1XXX",""),
	XKLS("KUALA LUMPUR STOCK EXCHANGE, THE","XKLSMYK1XXX","KL"),
	XKOR("KOREA STOCK EXCHANGE","XKORKRS1XXX","KS"),
	XKST("KANMON SHOHIN TORIHIKIJO (COMMODITY EXCHANGE)","XKSTJPJ1XXX",""),
	XKUW("KUWAIT STOCK EXCHANGE","XKUWKWK1XXX","KW"),
	XKYO("KYOTO STOCK EXCHANGE","XKYOJPJ1XXX","KY"),
	XLAU("LAUSANNE STOCK EXCHANGE","XLAUCH21XXX",""),
	XLIC("LILLE COMMODITY EXCHANGE","XLICFR21XXX",""),
	XLIF("LONDON INTERNATIONAL FINANCIAL FUTURES AND OPTIONS EXCHANGE","XLIFGB21XXX","3"),
	XLIL("LILLE STOCK EXCHANGE","XLILFR21XXX",""),
	XLIS("BOLSA DE VALORES DE LISBOA","XLISPTP1XXX","LS"),
	XLIT("NATIONAL STOCK EXCHANGE OF LITHUANIA","XLITLT21XXX","VL"),
	XLJU("LJUBLJANA STOCK EXCHANGE, INC.","XLJUSI21XXX",""),
	XLME("LONDON METAL EXCHANGE","XLMEGB21XXX",""),
	XLOF("KUALA LUMPUR OPTIONS AND FINANCIAL FUTURES EXCHANGE","XLOFMYK1XXX",""),
	XLON("LONDON STOCK EXCHANGE, THE","XLONGB21XXX","L"),
	XLTO("LONDON TRADE OPTIONS MARKET","XLTOGB21XXX","5"),
	XLUS("LUSAKA STOCK EXCHANGE","XLUSZML1XXX","LZ"),
	XLUX("LUXEMBOURG STOCK EXCHANGE","XLUXLUL1XXX","LU"),
	XLYO("LYON STOCK EXCHANGE","XLYOFR21XXX",""),
	XMAC("MID AMERICA COMMODITY EXCHANGE","XMACUS41XXX",""),
	XMAD("BOLSA DE MADRID","XMADESMMXXX","MA"),
	XMAE("MAZEDONIAN STOCK EXCHANGE","XMAEMK21XXX",""),
	XMAL("MALTA STOCK EXCHANGE","XMALMTM1XXX","MT"),
	XMAR("MARSEILLE STOCK EXCHANGE","XMARFR21XXX",""),
	XMAT("PARISBOURSE S.A. (FORMERLY MATIF S.A.)","XMATFRPPCRI",""),
	XMAU("STOCK EXCHANGE OF MAURITIUS LTD, THE","XMAUMUM1XXX","MZ"),
	XMCE("MERCATO CONTINUO ESPANOL","XMCEESB1XXX",""),
	XMDG("MARCHE INTERBANCAIRE DES DEVISES M.I.D.","XMDGMGM1XXX",""),
	XMDS("MADRAS STOCK EXCHANGE","XMDSIN51XXX","MD"),
	XMED("BOLSA DE MEDELLIN S.A.","XMEDCOB1XXX","ML"),
	XMEF("MEFF RENTA FIJA","XMEFESBBXXX","MC"),
	XMEV("MERCADO DE VALORES DE BUENOS AIRES S.A. - MERVAL","XMEVARB1XXX",""),
	XMEX("BOLSA MEXICANA DE VALORES (MEXICAN STOCK EXCHANGE)","XMEXMXM1XXX","MX"),
	XMGE("MINNEAPOLIS GRAIN EXCHANGE","XMGEUS41XXX",""),
	XMIC("MOSCOW INTERBANK CURRENCY EXCHANGE (MICEX)","XMICRUMMXXX","MM"),
	XMID("MIDWEST STOCK EXCHANGE","XMIDUS41XXX",""),
	XMIF("MERCATO ITALIANO FUTURES EXCHANGE","XMIFITM1XXX",""),
	XMIL("BORSA ITALIANA S.P.A.","XMILITMMXXX","MI"),
	XMKT("MAEBASHI KANKEN TORIHIKIJO (DRIED COCOON EXCHANGE)","XMKTJPJ1XXX",""),
	XMLX("OMLX, THE LONDON SECURITIES AND DERIVATIVES EXCHANGE LIMITED","XMLXGB21XXX",""),
	XMNT("BOLSA DE VALORES DE MONTEVIDEO","XMNTUYM1XXX",""),
	XMON("MARCHE DES OPTIONS NEGOCIABLES DE PARIS (MONEP)","XMONFRP1XXX","p"),
	XMOO("MONTREAL EXCHANGE THE / BOURSE DE MONTREAL","XMOOCAM1ODP","6"),
	XMOS("MOSCOW CENTRAL STOCK EXCHANGE","XMOSRUM1XXX","MO"),
	XMRV("MEFF RENTA VARIABLE","XMRVESM1XXX","16"),
	XMSW("MALAWI STOCK EXCHANGE","XMSWMWM1XXX",""),
	XMUN("BAYERISCHE BOERSE","XMUNDEM1XXX","MU"),
	XMUS("MUSCAT SECURITIES MARKET","XMUSOMM1XXX","OM"),
	XNAI("NAIROBI STOCK EXCHANGE","XNAIKEN1XXX","NR"),
	XNAM("NAMIBIAN STOCK EXCHANGE","XNAMNAN1XXX","NM"),
	XNAN("NANTES STOCK EXCHANGE","XNANFR21XXX",""),
	XNAP("BORSA VALORI DI NAPOLI (STOCK EXCHANGE)","XNAPITN1XXX",""),
	XNAS("NASDAQ","XNASUS31XXX","O"),
	XNAY("NANCY STOCK EXCHANGE","XNAYFR21XXX",""),
	XNEE("NEW ZEALAND FUTURES AND OPTIONS EXCHANGE","XNEENZ21XXX",""),
	XNEU("NEUCHATEL STOCK EXCHANGE","XNEUCH21XXX",""),
	XNEW("NEWEX","XNEWATW1XXX","NW"),
	XNGO("NAGOYA STOCK EXCHANGE","XNGOJPJ1XXX","NG"),
	XNII("NIIGATA STOCK EXCHANGE","XNIIJPJ1XXX",""),
	XNKS("NAGOYA KOKUMOTSU SATOU TORIHIKIJO (GRAIN AND SUGAR EXCHANGE)","XNKSJPJ1XXX",""),
	XNMS("NASDAQ/NMS (NATIONAL MARKET SYSTEM)","XNMSUS31XXX",""),
	XNSA("NIGERIAN STOCK EXCHANGE,THE","XNSANGL1XXX","LG"),
	XNSE("NATIONAL STOCK EXCHANGE of INDIA","XNSEINB1XXX","NS"),
	XNST("NAGOYA SENI TORIHIKIJO (TEXTILE EXCHANGE)","XNSTJPJ1XXX",""),
	XNYC("NEW YORK COTTON EXCHANGE","XNYCUS31XXX",""),
	XNYF("NEW YORK FUTURES EXCHANGE","XNYFUS31XXX",""),
	XNYM("NEW YORK MERCANTILE EXCHANGE","XNYMUS31XXX","12"),
	XNYS("NEW YORK STOCK EXCHANGE, INC.","XNYSUS31XXX","N"),
	XNZE("NEW ZEALAND STOCK EXCHANGE","XNZENZ21XXX","NZ"),
	XODE("ODESSA COMMODITY EXCHANGE","XODEUA21XXX",""),
	XOHS("OPTIONSSCHEINE-HANDELSSYSTEM (OHS)+B233","XOHSDEF1XXX",""),
	XOME("OM STOCKHOLM EXCHANGE","XOMESES1ECA",""),
	XOMF("OM FIXED INTEREST EXCHANGE","XOMFSES1BBA",""),
	XOPO("OPORTO STOCK EXCHANGE","XOPOPTP1XXX",""),
	XOSE("OSAKA SECURITIES EXCHANGE","XOSEJPJ1XXX","OS"),
	XOSL("OSLO BORS","XOSLNOK1XXX","OL"),
	XOSM("OSAKA MERCANTILE EXCHANGE","XOSMJPJ1XXX",""),
	XOST("OSAKA SENI TORIHIKIJO (TEXTILE EXCHANGE)","XOSTJPJ1XXX",""),
	XOTB("OESTERREICHISCHE TERMIN- UND OPTIONENBOERSE, CLEARING BANK AG","XOTBATW1XXX",""),
	XOTC("OTC BULLETIN BOARD","XOTCUS31XXX","OB"),
	XPAE("PALESTINA STOCK EXCHANGE","XPAEPS21XXX",""),
	XPAL("BORSA VALORI DI PALERMO (STOCK EXCHANGE)","XPALIT31XXX",""),
	XPAR("EURONEXT PARIS S.A.","XPARFRPP022","PA"),
	XPBT("PHILADELPHIA BOARD OF TRADE","XPBTUS31XXX",""),
	XPET("ST. PETERSBURG STOCK EXCHANGE","XPETRU21XXX","PE"),
	XPHL("PHILADELPHIA STOCK EXCHANGE","XPHLUS31XXX","PH"),
	XPHO("PHILADELPHIA OPTIONS EXCHANGE","XPHOUS31XXX","X"),
	XPHS("PHILIPPINE STOCK EXCHANGE, INC.","XPHSPHM1XXX","PS"),
	XPIC("SAINT-PETERSBURG CURRENCY EXCHANGE","XPICRU2PXXX",""),
	XPOR("PORTAL","XPORUS31XXX",""),
	XPRA("STOCK EXCHANGE PRAGUE CO. LTD, THE","XPRACZP1XXX","PR"),
	XPRI("PRIDNEPROVSK COMMODITY EXCHANGE","XPRIUA21XXX",""),
	XPSE("PACIFIC STOCK EXCHANGE INC.","XPSEUS61XXX","P"),
	XPTY("BOLSA DE VALORES DE PANAMA, S.A.","XPTYPAP1XXX",""),
	XQTX("BOERSE DUESSELDORF","XQTXDED1XXX",""),
	XQUI("QUITO STOCK EXCHANGE","XQUIECE1XXX",""),
	XRAS("RASDAQ","XRASROB1XXX","RQ"),
	XRIO("BOLSA DE VALORES DO RIO DE JANEIRO","XRIOBRR1XXX",""),
	XRIS("RIGA STOCK EXCHANGE,THE","XRISLV21XXX","RI"),
	XROM("BORSA VALORI DI ROMA (STOCK EXCHANGE)","XROMITR1XXX",""),
	XROS("BOLSA DE COMERCIO ROSARIO","XROSARB1XXX",""),
	XROV("ROSTOV CURRENCY AND STOCK EXCHANGE","XROVRU21XXX",""),
	XRTR("RTR (REUTERS-REALTIME-DATEN)","XRTRDEF1XXX",""),
	XRUS("RUSSIAN EXCHANGE, THE","XRUSRUM1XXX","RTS"),
	XSAF("SAFEX","XSAFZAJ1XXX",""),
	XSAM("SAMARA INTERBANK CURRENCY EXCHANGE","XSAMRU31XXX",""),
	XSAP("SAPPORO STOCK EXCHANGE","XSAPJPJ1XXX","SP"),
	XSCE("SINGAPORE COMMODITY EXCHANGE","XSCESGS1XXX",""),
	XSES("STOCK EXCHANGE OF SINGAPORE LTD","XSESSGS1XXX","SI"),
	XSFA("SOUTH AFRICAN FUTURES EXCHANGE - AGRICULTURAL MARKET DIVISION","XSFAZAJ1XXX",""),
	XSFE("SYDNEY FUTURES EXCHANGE LIMITED","XSFEAU21XXX",""),
	XSFX("EUREX ZURICH AG","XSFXCHZ1XXX","Z"),
	XSGE("SHANGHAI FUTURES EXCHANGE","XSGECNC1XXX",""),
	XSGO("SANTIAGO STOCK EXCHANGE","XSGOCLR1XXX","SN"),
	XSHE("SHENZHEN STOCK EXCHANGE","XSHECNB1XXX","SZ"),
	XSHG("SHANGHAI STOCK EXCHANGE","XSHGCNS1XXX","SS"),
	XSIB("SIBERIAN STOCK EXCHANGE","XSIBRU51XXX",""),
	XSIC("SIBERIAN INTERBANK CURRENCY EXCHANGE","XSICRU55XXX",""),
	XSIM("SINGAPORE EXCHANGE DERIVATIVES CLEARING LIMITED","XSIMSGSGXXX",""),
	XSME("SHENZHEN MERCANTILE EXCHANGE","XSMECNB1XXX",""),
	XSSE("STOCKHOLM STOCK EXCHANGE","XSSESES1XXX","ST"),
	XSTE("STOCK EXCHANGE","XSTEUZ21XXX",""),
	XSTU("BADEN-WUERTTEMBERGISCHE WERTPAPIERBOERSE ZU STUTTGART","XSTUDES1XXX","SG"),
	XSTX("STOXX EUROPEAN INDICES","XSTXDEF1XXX",""),
	XSUR("SURABAYA STOCK EXCHANGE","XSURIDJ1XXX","SU"),
	XSWX("SWISS EXCHANGE","XSWXCHZ1XXX","S"),
	XTAE("TEL AVIV STOCK EXCHANGE","XTAEILI1XXX","TA"),
	XTAI("TAIWAN STOCK EXCHANGE","XTAITWT1XXX","TW"),
	XTAL("TALLINN STOCK EXCHANGE","XTALEE21XXX","TL"),
	XTEH("TEHRAN STOCK EXCHANGE","XTEHIRT1XXX",""),
	XTFE("TORONTO FUTURES EXCHANGE","XTFECAT1XXX",""),
	XTFF("TOKYO INTERNATIONAL FINANCIAL FUTURES EXCHANGE, THE","XTFFJPJ1XXX",""),
	XTFN("TRADEPOINT FINANCIAL NETWORKS PLC","XTFNGB21XXX","TP"),
	XTKA("TOYOHASHI KANKEN TORIHIKIJO (DRIED COCOON EXCHANGE)","XTKAJPJ1XXX",""),
	XTKO("TOKYO KOKUMOTSU SHOHIN TORIHIKIJO (GRAIN EXCHANGE)","XTKOJPJ1XXX",""),
	XTKS("TOKYO STOCK EXCHANGE","XTKSJPJ1XXX","T"),
	XTKT("TOKYO KOGYOIN TORIHIKIJO (COMMODITY EXCHANGE)","XTKTJPJ1XXX",""),
	XTOE("TORONTO OPTIONS EXCHANGE","XTOECAT1XXX","K"),
	XTOR("BORSA VALORI DI TORINO (STOCK EXCHANGE)","XTORITT1XXX",""),
	XTRI("BORSA VALORI DI TRIESTE (STOCK EXCHANGE)","XTRIIT21XXX",""),
	XTRN("TRINIDAD AND TOBAGO STOCK EXCHANGE","XTRNTTP1XXX",""),
	XTSE("TORONTO STOCK EXCHANGE","XTSECAT1XXX","TO"),
	XTUN("BOURSE DES VALEURS MOBILIERES","XTUNTNT1XXX","TN"),
	XUKC("UKRAINIAN COMMODITY EXCHANGE","XUKCUAU1XXX",""),
	XUKR("UKRAINIAN UNIVERSAL COMMODITY EXCHANGE","XUKRUAU1XXX","PFT"),
	XUNI("UNIVERSAL BROKER'S EXCHANGE 'TASHKENT'","XUNIUZ21XXX",""),
	XURE("GUARDIAN ROYAL EXCHANGE","XUREGB21XXX",""),
	XVAL("BOLSA DE VALENCIA","XVALESV1XXX","VA"),
	XVEN("BORSA VALORI DI VENEZIA (STOCK EXCHANGE)","XVENIT21XXX",""),
	XVLA("VLADIVOSTOK (RUSSIA) STOCK EXCHANGE","XVLARU81XXX",""),
	XVPA("BOLSA DE VALORES Y PRODUCTOS DE ASUNCION S.A. (BVPASA)","XVPAPYP1XXX",""),
	XVSE("VANCOUVER STOCK EXCHANGE","XVSECA81XXX","V"),
	XVTX("VIRT-X","XVTXGB21XXX","VX"),
	XWAR("WARSAW STOCK EXCHANGE","XWARPLP1XXX",""),
	XWBO("WIENER BOERSE AG","XWBOATW1XXX",""),
	XWCE("WINNIPEG COMMODITY EXCHANGE, THE","XWCECA41XXX",""),
	XYKT("YOKOHAMA KIITO TORIHIKIJO (RAW SILK EXCHANGE)","XYKTJPJ1XXX",""),
	XZAG("ZAGREB STOCK EXCHANGE, THE","XZAGHR21XXX",""),
	XZIM("ZIMBABWE STOCK EXCHANGE","XZIMZWH1XXX","ZI"),
	XZRH("ZURICH STOCK EXCHANGE","XZRHCHZ1XXX",""),
	;
	
	//String key; // the MIC code. The key is the enum name
	String name;
	String bic;
	String oldFIXId;

	Boolean tradingDOW[] = {false, true, true, true, true, true, false};
	
	private Exchange(String name, String bic, String oldFIXId, Boolean[] tradingDOW) {
		this.name = name;
		this.bic = bic;
		this.oldFIXId = oldFIXId;
		this.tradingDOW = tradingDOW;
	}

	private Exchange(String name, String bic, String oldFIXId) {
		this.name = name;
		this.bic = bic;
		this.oldFIXId = oldFIXId;
	}

	
	public static void main(String[] args) {
		Exchange[] values = Exchange.values();
		for (Exchange e : values) {
			System.err.print('{');
			print("id");
			System.err.print(':');
			print(e.toString());
			System.err.print(',');
			print("name");
			System.err.print(':');
			print(e.name);
			System.err.print(',');
			print("bic");
			System.err.print(':');
			print(e.bic);
			
			if (!e.oldFIXId.trim().isEmpty()) {
				System.err.print(',');
				print("oldFIXId");
				System.err.print(':');
				print(e.oldFIXId);
			}
			
			System.err.println("},");
		}
	}

	private static void print(String s) {
		System.err.print('\"');
		System.err.print(s);
		System.err.print('\"');
	}
	
	
}
*/